package com.huawei.lynnbit.tool.cocos.config.game.task;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonSubTypes({
        @JsonSubTypes.Type(value = CmdTask.class, name = Task.TYPE_CMD),
        @JsonSubTypes.Type(value = CopyFileTask.class, name = Task.TYPE_COPY_FILE),
        @JsonSubTypes.Type(value = CopySnippetTask.class, name = Task.TYPE_COPY_SNIPPET),
        @JsonSubTypes.Type(value = ReplaceFileTask.class, name = Task.TYPE_REPLACE_FILE),
        @JsonSubTypes.Type(value = ReplaceStringTask.class, name = Task.TYPE_REPLACE_STRING),
        @JsonSubTypes.Type(value = DeleteFileTask.class, name = Task.TYPE_DELETE_FILE),
        @JsonSubTypes.Type(value = DeleteStringTask.class, name = Task.TYPE_DELETE_STRING),
})
public interface Task {
    String TYPE_CMD = "cmd";
    String TYPE_COPY_FILE = "copyFile";
    String TYPE_COPY_SNIPPET = "copySnippet";
    String TYPE_REPLACE_FILE = "replaceFile";
    String TYPE_REPLACE_STRING = "replaceString";
    String TYPE_DELETE_FILE = "deleteFile";
    String TYPE_DELETE_STRING = "deleteString";

    Stage getStage();

    String getType();

    boolean isValid();

    String getTaskInfo();
}
